﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FittyWars.BordUtils
{
    class Fitty : Creature
    {
        public Random rand;

        public Fitty(int seed)
            : base()
        {
            rand = new Random(seed);
        }

        private int times;
        public override void Think(List<Element> nearElements)
        {
            if (times == 0)
            {
                Direction = (float)(2 * Math.PI * rand.NextDouble());
                times = 10;
            }
            else
            {
                times--;
            }
            /*
            foreach (Element elem in nearElements)
            {
                if (elem.GetGameElement() == GameManager.GameElement.Duck)
                {
                    double dx = Posx - elem.Posx;
                    double dy = Posy - elem.Posy;
                    Direction = Math.Atan(dy / dx);
                    if (dx > 0 ) Direction += Math.PI;
                    return;
                }
            }
            */
        }
    }
}
